package com.ask.factory;

import com.ask.service.CarService;
import com.ask.service.Impl.CarServiceImpl;
import org.springframework.beans.factory.FactoryBean;

public class CarFactoryBean implements FactoryBean<CarServiceImpl> {
    @Override
    public CarServiceImpl getObject() throws Exception {
        return new CarServiceImpl();
    }

    @Override
    public Class<?> getObjectType() {
        return CarService.class;
    }

    // 默认是单例
    @Override
    public boolean isSingleton() {
        return true;
    }
}
